package com.wyh.jwt;

import io.jsonwebtoken.Claims;

import java.util.HashMap;
import java.util.LinkedHashMap;

public class Main {
    public static void main(String[] args) {
        HashMap<String, Object> claim = new LinkedHashMap<>();
        claim.put("userName", "张三");
        claim.put("age",14);
        String token = JWTUtil.getToken(claim);
        System.out.println(token);

        Claims claims = JWTUtil.parseToken(token);
        System.out.println(claims);
    }
}
